package lesson.Objectstream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class ObjectStreamDemo1 {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("Day12\\src\\lesson\\Objectstream\\a.txt"));

        User user = new User("zhangsan","123456");
        oos.writeObject(user);
        oos.close();
    }
}
